import React from 'react';
import { Row,Col } from 'antd';
import './index.less';
import  Util from'../../utils/utils';

export default class Header extends React.Component{
    componentWillMount(){
        this.setState({
            usreName:'超哥'
        })
        setInterval(()=>{
            let sysTime = Util.formateDate(new Date().getTime());
            this.setState({
                sysTime
            })
        })
    }
    render (){
        return (
            <div className="header">
                <Row className="header-top">
                    <Col span={24}>
                        <span>欢迎，{this.state.usreName}</span>
                        <a href="#">退出</a>
                    </Col>
                </Row>
                <Row className="breadcrumd">
                    <Col span={4} className="breadcrumd-title">
                        首页
                    </Col>
                    <Col span={20} className="weather">
                        <span className="date">{this.state.sysTime}</span>
                        <span className="weather-detail">晴转多云</span>
                    </Col>
                </Row>
            </div>
        );
    }
}